#pragma once

class GRect :public Rectangle, public Graphical
{
private:
	int left, top;

private:
	Gdiplus::Color color = 0xff000000;
	Gdiplus::SolidBrush * brush = nullptr;

	void update_brush();
public:
	GRect(int width = 0, int height = 0, int left = 0, int top = 0);
	~GRect();

	int get_left() { return left; }
	void set_left(int left) { this->left = left; }

	int get_top() { return top; }
	void set_top(int top) { this->top = top; }

	Gdiplus::Color get_color() { return color; }
	void set_color(Gdiplus::Color color);

	virtual void draw(Gdiplus::Graphics & graphics) override;
};